﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightAnalytics
{
    /// <summary>
    /// A lightweight class for tracking page views
    /// </summary>
    public class Analytics : PageTracker 
    {
        public Analytics()
            : base()
        {

        }

        /// <summary>
        /// Track a page view
        /// </summary>
        /// <param name="pageUrl">The URL of the page to track</param>
        public void TrackPageview(Uri pageUrl)
        {
            TrackPageview(pageUrl.ToString());
        }

        /// <summary>
        /// Track a page view
        /// </summary>
        /// <param name="pageUrl">The URL of the page to track</param>
        public void TrackPageview(String pageUrl)
        {
            Tracker.Invoke("_trackPageview", pageUrl);
        }

      

    }
}
